#include <iostream>

using namespace std;

class Animal
{
public:
	Animal()
	{
		cout<<"Animal"<<endl;
	}
	virtual ~Animal()
	{
		cout<<"Animal析构"<<endl;
	}
};

class Dog:public Animal
{
public:
	Dog()
	{
		cout<<"Dog"<<endl;
	}
	~Dog()
	{
		cout<<"Dog析构"<<endl;
	}
};

int main()
{
	Animal *p=new Dog;
	//Dog *p=new Dog;
	delete p;
}